package com.example.demo;

import com.example.demo.model.User;
import com.example.demo.model.person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.PostConstruct;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-08-01
 * Time: 16:34
 */
@Controller
@ResponseBody
@RequestMapping("/user")
public class UserController {
//    @Value("${myobj.name}")
//    private String name1;

    //@Autowired private person p;
    @Autowired
    private User user;
    @PostConstruct
    public void doPost(){
        System.out.println(user.toString());
    }
}
